const { Controller } = require( 'egg' );

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    ctx.body = 'hi, egg';
  }

  async demo() {
    const { ctx } = this;
    console.log( ctx.query );
    let res = await ctx.service.home.demo()
    ctx.body = res
  }

  async getDataList() {
    const { ctx } = this;
    console.log( ctx.request );
    let res = await ctx.service.home.getDataList( ctx.request.body )
    ctx.body = res
  }
}

module.exports = HomeController;
